-
Notifications
You must be signed in to change notification settings - Fork 315
Add bootstrap development guidelines #9821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
|
🎯 Code Coverage 🔗 Commit SHA: 61ad496 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 1 performance improvements and 1 performance regressions! Performance is the same for 50 metrics, 13 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~61ad496ab7, baseline=1.56.0-SNAPSHOT~5db793a092
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.052 s) : 0, 1051659
Total [baseline] (10.955 s) : 0, 10955434
Agent [candidate] (1.029 s) : 0, 1029038
Total [candidate] (10.799 s) : 0, 10799047
section appsec
Agent [baseline] (1.224 s) : 0, 1223527
Total [baseline] (10.88 s) : 0, 10880470
Agent [candidate] (1.199 s) : 0, 1199232
Total [candidate] (10.87 s) : 0, 10870488
section iast
Agent [baseline] (1.18 s) : 0, 1179815
Total [baseline] (11.203 s) : 0, 11203061
Agent [candidate] (1.154 s) : 0, 1154262
Total [candidate] (11.125 s) : 0, 11125022
section profiling
Agent [baseline] (1.197 s) : 0, 1196931
Total [baseline] (10.93 s) : 0, 10930436
Agent [candidate] (1.183 s) : 0, 1182516
Total [candidate] (10.928 s) : 0, 10928094
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~61ad496ab7, baseline=1.56.0-SNAPSHOT~5db793a092
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.472 ms) : 0, 1472
BytebuddyAgent [baseline] (708.015 ms) : 0, 708015
BytebuddyAgent [candidate] (700.99 ms) : 0, 700990
GlobalTracer [baseline] (246.763 ms) : 0, 246763
GlobalTracer [candidate] (245.699 ms) : 0, 245699
AppSec [baseline] (32.324 ms) : 0, 32324
AppSec [candidate] (32.783 ms) : 0, 32783
Debugger [baseline] (6.427 ms) : 0, 6427
Debugger [candidate] (6.416 ms) : 0, 6416
Remote Config [baseline] (735.464 µs) : 0, 735
Remote Config [candidate] (681.468 µs) : 0, 681
Telemetry [baseline] (15.397 ms) : 0, 15397
Telemetry [candidate] (9.411 ms) : 0, 9411
Flare Poller [baseline] (5.709 ms) : 0, 5709
Flare Poller [candidate] (10.228 ms) : 0, 10228
section appsec
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.455 ms) : 0, 1455
BytebuddyAgent [baseline] (729.892 ms) : 0, 729892
BytebuddyAgent [candidate] (720.641 ms) : 0, 720641
GlobalTracer [baseline] (238.023 ms) : 0, 238023
GlobalTracer [candidate] (236.051 ms) : 0, 236051
AppSec [baseline] (175.133 ms) : 0, 175133
AppSec [candidate] (175.589 ms) : 0, 175589
Debugger [baseline] (5.992 ms) : 0, 5992
Debugger [candidate] (6.069 ms) : 0, 6069
Remote Config [baseline] (658.413 µs) : 0, 658
Remote Config [candidate] (632.686 µs) : 0, 633
Telemetry [baseline] (8.566 ms) : 0, 8566
Telemetry [candidate] (8.609 ms) : 0, 8609
Flare Poller [baseline] (3.99 ms) : 0, 3990
Flare Poller [candidate] (3.893 ms) : 0, 3893
IAST [baseline] (24.829 ms) : 0, 24829
IAST [candidate] (25.036 ms) : 0, 25036
section iast
crashtracking [baseline] (1.461 ms) : 0, 1461
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (828.608 ms) : 0, 828608
BytebuddyAgent [candidate] (816.547 ms) : 0, 816547
GlobalTracer [baseline] (234.844 ms) : 0, 234844
GlobalTracer [candidate] (232.336 ms) : 0, 232336
AppSec [baseline] (30.407 ms) : 0, 30407
AppSec [candidate] (35.779 ms) : 0, 35779
Debugger [baseline] (5.973 ms) : 0, 5973
Debugger [candidate] (6.229 ms) : 0, 6229
Remote Config [baseline] (601.21 µs) : 0, 601
Remote Config [candidate] (611.981 µs) : 0, 612
Telemetry [baseline] (8.428 ms) : 0, 8428
Telemetry [candidate] (8.82 ms) : 0, 8820
Flare Poller [baseline] (4.123 ms) : 0, 4123
Flare Poller [candidate] (4.306 ms) : 0, 4306
IAST [baseline] (30.619 ms) : 0, 30619
IAST [candidate] (26.703 ms) : 0, 26703
section profiling
ProfilingAgent [baseline] (111.669 ms) : 0, 111669
ProfilingAgent [candidate] (110.897 ms) : 0, 110897
crashtracking [baseline] (1.457 ms) : 0, 1457
crashtracking [candidate] (1.483 ms) : 0, 1483
BytebuddyAgent [baseline] (731.455 ms) : 0, 731455
BytebuddyAgent [candidate] (732.843 ms) : 0, 732843
GlobalTracer [baseline] (222.401 ms) : 0, 222401
GlobalTracer [candidate] (222.076 ms) : 0, 222076
AppSec [baseline] (32.176 ms) : 0, 32176
AppSec [candidate] (32.831 ms) : 0, 32831
Debugger [baseline] (7.474 ms) : 0, 7474
Debugger [candidate] (7.586 ms) : 0, 7586
Remote Config [baseline] (717.413 µs) : 0, 717
Remote Config [candidate] (697.489 µs) : 0, 697
Telemetry [baseline] (15.551 ms) : 0, 15551
Telemetry [candidate] (13.644 ms) : 0, 13644
Flare Poller [baseline] (4.115 ms) : 0, 4115
Flare Poller [candidate] (5.756 ms) : 0, 5756
Profiling [baseline] (112.335 ms) : 0, 112335
Profiling [candidate] (111.544 ms) : 0, 111544
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~61ad496ab7, baseline=1.56.0-SNAPSHOT~5db793a092
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056998
Total [baseline] (8.675 s) : 0, 8675211
Agent [candidate] (1.027 s) : 0, 1026871
Total [candidate] (8.7 s) : 0, 8699688
section iast
Agent [baseline] (1.188 s) : 0, 1188164
Total [baseline] (9.337 s) : 0, 9336808
Agent [candidate] (1.156 s) : 0, 1156410
Total [candidate] (9.325 s) : 0, 9325330
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~61ad496ab7, baseline=1.56.0-SNAPSHOT~5db793a092
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.472 ms) : 0, 1472
crashtracking [candidate] (1.468 ms) : 0, 1468
BytebuddyAgent [baseline] (711.349 ms) : 0, 711349
BytebuddyAgent [candidate] (699.925 ms) : 0, 699925
GlobalTracer [baseline] (248.013 ms) : 0, 248013
GlobalTracer [candidate] (245.259 ms) : 0, 245259
AppSec [baseline] (32.763 ms) : 0, 32763
AppSec [candidate] (32.37 ms) : 0, 32370
Debugger [baseline] (6.504 ms) : 0, 6504
Debugger [candidate] (6.313 ms) : 0, 6313
Remote Config [baseline] (721.907 µs) : 0, 722
Remote Config [candidate] (683.692 µs) : 0, 684
Telemetry [baseline] (13.78 ms) : 0, 13780
Telemetry [candidate] (9.374 ms) : 0, 9374
Flare Poller [baseline] (7.426 ms) : 0, 7426
Flare Poller [candidate] (10.153 ms) : 0, 10153
section iast
crashtracking [baseline] (1.477 ms) : 0, 1477
crashtracking [candidate] (1.48 ms) : 0, 1480
BytebuddyAgent [baseline] (834.713 ms) : 0, 834713
BytebuddyAgent [candidate] (818.578 ms) : 0, 818578
GlobalTracer [baseline] (235.719 ms) : 0, 235719
GlobalTracer [candidate] (232.992 ms) : 0, 232992
IAST [baseline] (31.884 ms) : 0, 31884
IAST [candidate] (26.659 ms) : 0, 26659
AppSec [baseline] (29.929 ms) : 0, 29929
AppSec [candidate] (35.34 ms) : 0, 35340
Debugger [baseline] (6.046 ms) : 0, 6046
Debugger [candidate] (6.181 ms) : 0, 6181
Remote Config [baseline] (614.957 µs) : 0, 615
Remote Config [candidate] (599.665 µs) : 0, 600
Telemetry [baseline] (8.573 ms) : 0, 8573
Telemetry [candidate] (8.718 ms) : 0, 8718
Flare Poller [baseline] (4.148 ms) : 0, 4148
Flare Poller [candidate] (4.371 ms) : 0, 4371
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 3 performance regressions! Performance is the same for 9 metrics, 23 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~61ad496ab7, baseline=1.56.0-SNAPSHOT~5db793a092
dateFormat X
axisFormat %s
section baseline
no_agent (37.669 ms) : 37358, 37981
. : milestone, 37669,
appsec (46.255 ms) : 45857, 46654
. : milestone, 46255,
code_origins (42.998 ms) : 42627, 43369
. : milestone, 42998,
iast (44.107 ms) : 43731, 44483
. : milestone, 44107,
profiling (45.236 ms) : 44825, 45647
. : milestone, 45236,
tracing (42.786 ms) : 42431, 43141
. : milestone, 42786,
section candidate
no_agent (36.365 ms) : 36070, 36659
. : milestone, 36365,
appsec (48.109 ms) : 47685, 48532
. : milestone, 48109,
code_origins (43.309 ms) : 42944, 43673
. : milestone, 43309,
iast (44.477 ms) : 44107, 44848
. : milestone, 44477,
profiling (48.267 ms) : 47827, 48708
. : milestone, 48267,
tracing (45.336 ms) : 44928, 45743
. : milestone, 45336,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~61ad496ab7, baseline=1.56.0-SNAPSHOT~5db793a092
dateFormat X
axisFormat %s
section baseline
no_agent (4.365 ms) : 4315, 4415
. : milestone, 4365,
iast (9.742 ms) : 9579, 9904
. : milestone, 9742,
iast_FULL (14.983 ms) : 14685, 15281
. : milestone, 14983,
iast_GLOBAL (10.485 ms) : 10301, 10668
. : milestone, 10485,
profiling (9.015 ms) : 8863, 9166
. : milestone, 9015,
tracing (7.78 ms) : 7666, 7895
. : milestone, 7780,
section candidate
no_agent (4.309 ms) : 4260, 4357
. : milestone, 4309,
iast (9.344 ms) : 9194, 9493
. : milestone, 9344,
iast_FULL (14.305 ms) : 14018, 14593
. : milestone, 14305,
iast_GLOBAL (10.251 ms) : 10070, 10432
. : milestone, 10251,
profiling (8.974 ms) : 8834, 9113
. : milestone, 8974,
tracing (7.639 ms) : 7528, 7750
. : milestone, 7639,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~61ad496ab7, baseline=1.56.0-SNAPSHOT~5db793a092
dateFormat X
axisFormat %s
section baseline
no_agent (1.483 ms) : 1472, 1495
. : milestone, 1483,
appsec (3.728 ms) : 3510, 3947
. : milestone, 3728,
iast (2.225 ms) : 2161, 2289
. : milestone, 2225,
iast_GLOBAL (2.265 ms) : 2201, 2329
. : milestone, 2265,
profiling (2.061 ms) : 2009, 2113
. : milestone, 2061,
tracing (2.033 ms) : 1983, 2082
. : milestone, 2033,
section candidate
no_agent (1.479 ms) : 1467, 1490
. : milestone, 1479,
appsec (3.736 ms) : 3515, 3957
. : milestone, 3736,
iast (2.214 ms) : 2150, 2278
. : milestone, 2214,
iast_GLOBAL (2.26 ms) : 2195, 2324
. : milestone, 2260,
profiling (2.068 ms) : 2015, 2121
. : milestone, 2068,
tracing (2.04 ms) : 1990, 2090
. : milestone, 2040,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~61ad496ab7, baseline=1.56.0-SNAPSHOT~5db793a092
dateFormat X
axisFormat %s
section baseline
no_agent (14.928 s) : 14928000, 14928000
. : milestone, 14928000,
appsec (15.23 s) : 15230000, 15230000
. : milestone, 15230000,
iast (18.135 s) : 18135000, 18135000
. : milestone, 18135000,
iast_GLOBAL (18.02 s) : 18020000, 18020000
. : milestone, 18020000,
profiling (15.037 s) : 15037000, 15037000
. : milestone, 15037000,
tracing (14.727 s) : 14727000, 14727000
. : milestone, 14727000,
section candidate
no_agent (15.438 s) : 15438000, 15438000
. : milestone, 15438000,
appsec (15.069 s) : 15069000, 15069000
. : milestone, 15069000,
iast (18.584 s) : 18584000, 18584000
. : milestone, 18584000,
iast_GLOBAL (17.915 s) : 17915000, 17915000
. : milestone, 17915000,
profiling (15.172 s) : 15172000, 15172000
. : milestone, 15172000,
tracing (14.94 s) : 14940000, 14940000
. : milestone, 14940000,
|
sarahchen6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (from someone who doesn't know the details about bootstrap and premain). All of the context is really helpful!
f945dbd to
487b8dd
Compare
Thanks for the review and feedback 🙏 |
docs/bootstrap_design_guidelines.md
Outdated
| Code running before the internal logger is configured ([Agent.java line 154](https://github.com/DataDog/dd-trace-java/blob/v1.53.0/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java#L154)) must use `System.err`, not `System.out`, which is reserved for application output: | ||
|
|
||
| ```java | ||
| System.err.println("Diagnostic message"); // System.error, NOT System.out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| System.err.println("Diagnostic message"); // System.error, NOT System.out | |
| System.err.println("Diagnostic message"); // System.err, NOT System.out |
mcculls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
487b8dd to
b5b282e
Compare
b5b282e to
61ad496
Compare
What Does This Do
This PR adds documentation about pitfalls and guideline implementation the agent bootstrap.
It also includes an addition about logging guidelines for instrumentations.
Motivation
The goal is to capture the knowledge so it would make it easier for contributors to avoid common pitfalls that might not be caught by testing.
Additional Notes
Refers to the discussions from both internal Slack channel and #9780
cc @mcculls who's the most knowledgeable about this part.
I would like to make sure I get it right. Feel free to edit the PR or add comment for me to amend the doc 🙏
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]